package org.potato.security.config;

import org.potato.security.handler.AuthenticationFailureHandler;
import org.potato.security.handler.AuthenticationSuccessHandler;
import org.potato.security.handler.LoginSuccessHandler;
import org.potato.security.handler.TokenHandler;
import org.potato.security.provider.AuthenticationProvider;

/**
 * SecurityConfiguration
 */
public class SecurityConfiguration {

    private AuthenticationProvider authenticationProvider;
    private Boolean enableGlobalAuthenticated;
    private TokenHandler tokenHandler;
    private LoginSuccessHandler loginSuccessHandler;
    private AuthenticationSuccessHandler authenticationSuccessHandler;
    private AuthenticationFailureHandler authenticationFailureHandler;

    public static SecurityConfigurationBuilder builder() {
        return new SecurityConfigurationBuilder();
    }

    public AuthenticationProvider getAuthenticationProvider() {
        return authenticationProvider;
    }

    public void setAuthenticationProvider(AuthenticationProvider authenticationProvider) {
        this.authenticationProvider = authenticationProvider;
    }

    public Boolean getEnableGlobalAuthenticated() {
        return enableGlobalAuthenticated;
    }

    public void setEnableGlobalAuthenticated(Boolean enableGlobalAuthenticated) {
        this.enableGlobalAuthenticated = enableGlobalAuthenticated;
    }

    public TokenHandler getTokenHandler() {
        return tokenHandler;
    }

    public void setTokenHandler(TokenHandler tokenHandler) {
        this.tokenHandler = tokenHandler;
    }

    public LoginSuccessHandler getLoginSuccessHandler() {
        return loginSuccessHandler;
    }

    public void setLoginSuccessHandler(LoginSuccessHandler loginSuccessHandler) {
        this.loginSuccessHandler = loginSuccessHandler;
    }

    public AuthenticationSuccessHandler getAuthenticationSuccessHandler() {
        return authenticationSuccessHandler;
    }

    public void setAuthenticationSuccessHandler(AuthenticationSuccessHandler authenticationSuccessHandler) {
        this.authenticationSuccessHandler = authenticationSuccessHandler;
    }

    public AuthenticationFailureHandler getAuthenticationFailureHandler() {
        return authenticationFailureHandler;
    }

    public void setAuthenticationFailureHandler(AuthenticationFailureHandler authenticationFailureHandler) {
        this.authenticationFailureHandler = authenticationFailureHandler;
    }
}